<template>
    <view class="outview">
        <view class="minela">
            <navigator url="../persondata/persondata">
                <view>
                    <text>个人资料</text>
                </view>
                <image class="rightarrow" src="../../static/img/arrowright.png"></image>
            </navigator>
        </view>
        <!-- <view class="minela">
            <navigator url="../bindtel/bindtel">
                <view>
                    <text>手机号码</text>
                </view>
                <image class="rightarrow" src="../../static/img/arrowright.png"></image>
            </navigator>
        </view> -->
        <view class="minela">
            <navigator url="../editloginpad/editloginpad">
                <view>
                    <text>修改登录密码</text>
                </view>
                <image class="rightarrow" src="../../static/img/arrowright.png"></image>
            </navigator>
        </view>
        <!-- <view class="minela">
            <navigator url="../editpaypad/editpaypad">
                <view>
                    <text>修改支付密码</text>
                </view>
                <image class="rightarrow" src="../../static/img/arrowright.png"></image>
            </navigator>
        </view> -->
        <view class="logout" @click="logoutFn">
            退出登录
        </view>
    </view>
</template>

<script>
    let uinfo;
    import request from "../../untils/request.js";
    export default {
        data() {
            return {

            }
        },
        onLoad() {
            uinfo = uni.getStorageSync('userInfo');

        },
        methods: {
            logoutFn() {
                let _this=this;
                uni.showLoading({
                    mask:true
                });
				
				uni.hideLoading();
				uni.removeStorageSync('userInfo');
				uni.showToast({
				    icon: "none",
				    title: '退出成功',
				});
				uni.reLaunch({
				  url: '/pages/login/login',
				});
                /* request.postMember('/user/info/queryUserInfo', {
                    userId: uinfo.userId,
                }).then(res => {
                    if (res.code == '200') {
						res.data.mobile = ''
                        if (res.data.mobile == null) {
                            uni.showToast({
                                icon: "none",
                                title: '请先绑定手机号',
                            })
                            uni.navigateTo({
                                url: '/pages/bindtel/bindtel',
                            })
                        } else {
                            console.log('已绑定')
                            request.postMember('/user/login/logout',{}).then(ress => {
                                    uni.hideLoading();
                                    uni.removeStorageSync('userInfo');
                                    uni.showToast({
                                        icon: "none",
                                        title: '退出成功',
                                    });
									uni.reLaunch({
									  url: '/pages/login/login',
									});
                            })
                        }
                    }
                }) */
                
            },
        }
    }
</script>

<style>
    .outview {
        background-color: #F5F5F5;
        height: 93.3vh;
    }

    .minela {
        width: 710rpx;
        height: 108rpx;
        background: #FFFFFF;
        margin: 0 auto 20rpx;
        border-radius: 6px;
    }

    .minela navigator {
        display: flex;
        height: 108rpx;
        align-items: center;
        margin: 0 60rpx 0 40rpx;
        justify-content: space-between;
    }

    .minela text {
        font-size: 16px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        line-height: 27px;
        color: #333333;
    }

    .minela .rightarrow {
        width: 14rpx;
        height: 22rpx;
    }

    .logout {
        font-size: 14px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        line-height: 38px;
        color: #FFFFFF;
        width: 710rpx;
        height: 38px;
        background: #7F6AC3;
        border-radius: 19px;
        text-align: center;
        margin: 100px auto 0;
    }
</style>
